package cn.zhaoyuening.rpcdemo.utils;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;

public class StringUtils {
	public static String input2Str(InputStream in) throws IOException{
		byte[] buf = new byte[1024];
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		int len=0;
		while((len=in.read(buf))>0){
			baos.write(buf, 0, len);
		}
		return baos.toString("utf8");
	}
}
